import { defineStore } from 'pinia'
import type { UserRsp } from '../models'
import { ref } from 'vue'

export const useUserStore = defineStore('user', () => {

    const userinfo = ref<UserRsp|null>(null);
    function setUserInfo(user:UserRsp){
        userinfo.value = user;
    }

    return { userinfo,setUserInfo }
},
{
    persist: true,
})